﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro">

    <ControlTemplate x:Key="FlipViewTemplate" TargetType="{x:Type Controls:FlipView}">
        <Grid x:Name="root" FocusVisualStyle="{x:Null}">
            <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                <Grid>
                    <Grid x:Name="ControlGrid" Panel.ZIndex="5">
                        <Button x:Name="PART_BackButton" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{DynamicResource ControlButton}">
                            <Path Width="16" Height="18" Stretch="Fill" Fill="Black" Data="F1 M 22.6563,23.75L 24.6563,25.75L 31.9063,32.75L 25.4063,32.75L 15.9063,23.75L 25.4063,14.75L 31.9063,14.75L 24.6563,21.75L 22.6563,23.75 Z " />
                        </Button>
                        <Button x:Name="PART_ForwardButton" VerticalAlignment="Center" HorizontalAlignment="Right" Style="{DynamicResource ControlButton}">
                            <Path Width="16" Height="18" Stretch="Fill" Fill="Black" Data="F1 M 25.1563,23.75L 23.1563,21.75L 15.9063,14.75L 22.4063,14.75L 31.9063,23.75L 22.4063,32.75L 15.9063,32.75L 23.1563,25.75L 25.1563,23.75 Z " />
                        </Button>

                        <Grid VerticalAlignment="Bottom" Height="0" x:Name="PART_BannerGrid" Panel.ZIndex="6" Opacity="0.85">
                            <Grid.Background>
                                <SolidColorBrush Color="Black"/>
                            </Grid.Background>
                            <Label FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" x:Name="PART_BannerLabel" IsTabStop="False">
                                <Label.Foreground>
                                    <SolidColorBrush Color="White" />
                                </Label.Foreground>
                            </Label>
                        </Grid>
                    </Grid>
                    <Controls:TransitioningContentControl Content="{TemplateBinding SelectedItem}"
                                                  ContentTemplate="{TemplateBinding ItemTemplate}" x:Name="PART_Presenter" Panel.ZIndex="1" IsTabStop="False"/>
                </Grid>
            </Border>
        </Grid>
        <ControlTemplate.Resources>
            <Style TargetType="Button" x:Key="ControlButton">
                <Setter Property="Height" Value="30"/>
                <Setter Property="Width" Value="50"/>
                <Setter Property="Opacity" Value="0.4"/>
                <Setter Property="Panel.ZIndex" Value="5"/>
                <Setter Property="IsTabStop" Value="False"/>
                <Setter Property="Focusable" Value="True"/>
                <Setter Property="Background" Value="White"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Border BorderBrush="{TemplateBinding Background}" Padding="1" CornerRadius="4">
                                <Grid Background="{TemplateBinding Background}">
                                    <Label FontFamily="Marlett" Foreground="{TemplateBinding Foreground}" FontSize="17" HorizontalAlignment="Center" VerticalAlignment="Center">
                                        <ContentPresenter ContentSource="Content"/>
                                    </Label>

                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Opacity" Value="1.0"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Storyboard x:Key="ShowBannerStoryboard">
                <DoubleAnimation From="0.0" To="30.0" AccelerationRatio="1.0" SpeedRatio="2.5" Storyboard.TargetProperty="Height"/>
            </Storyboard>
            <Storyboard x:Key="HideBannerStoryboard">
                <DoubleAnimation From="30.0" To="0.0" AccelerationRatio="1.0" SpeedRatio="2.5" Storyboard.TargetProperty="Height"/>
            </Storyboard>
            <Storyboard x:Key="HideControlStoryboard">
                <DoubleAnimation From="1.0" To="0.0" AccelerationRatio="1.0" SpeedRatio="2.5" Storyboard.TargetProperty="Opacity"/>
            </Storyboard>
            <Storyboard x:Key="ShowControlStoryboard">
                <DoubleAnimation From="0.0" To="1.0" AccelerationRatio="1.0" SpeedRatio="2.5" Storyboard.TargetProperty="Opacity"/>
            </Storyboard>
        </ControlTemplate.Resources>
    </ControlTemplate>
    <Style x:Key="flipViewStyle" TargetType="{x:Type Controls:FlipView}">
        <Setter Property="MinHeight" Value="100"/>
        <Setter Property="MinWidth" Value="100"/>
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="Selector.IsSynchronizedWithCurrentItem" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template" Value="{StaticResource FlipViewTemplate}"/>
    </Style>

</ResourceDictionary>